package net.hn.hnms.biz.api.video;

import io.swagger.annotations.ApiOperation;
import net.hn.hnms.biz.api.feign.base.FeignClientsConfigurationCustom;
import net.hn.hnms.biz.api.feign.model.DataStateVo;
import net.hn.hnms.biz.api.video.model.dto.Camera;
import net.hn.hnms.sys.common.core.constant.ServiceNameConstants;
import net.hn.hnms.sys.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Author: PanSX
 * Date: 2022/8/5 15:25
 */
@FeignClient(contextId = "RemoteVideoService", value = ServiceNameConstants.HNMS_BIZ_VIDEO
        , fallback = net.hn.hnms.biz.api.video.RemoteVideoServiceFallback.class, configuration = FeignClientsConfigurationCustom.class
)
@Component
public interface RemoteVideoService {

    @GetMapping("/hik/getStreamUrl")
    R<String> getStreamUrl(@RequestParam(value = "cameraIndexCode") String cameraIndexCode,
                           @RequestParam(value = "streamType", defaultValue = "0") String streamType,
                           @RequestParam(value = "protocol") String protocol,
                           @RequestParam(value = "transmode") String transmode,
                           @RequestParam(value = "streamform") String streamform,
                           @RequestParam(value = "expand") String expand);


    @GetMapping("/hik/list")
    R<List<Camera>> list();

}
